<!DOCTYPE html>
<html>
<head>
<base href="<?php  echo base_url();?>"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="res/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="res/js/jquery-1.12.2.min.js"></script>
<script type="text/javascript" src="res/js/bootstrap.min.js"></script>
<title>Graded Fund-B</title>
<style type="text/css">

</style>
</head>
<body>
	<div class="container-fluid">
	<div class="row">
		<div class="col-md-2 col-sm-2 column">
		</div>
		<div class="col-md-6 col-sm-6 column">
			<div class="row">
				<ul class="breadcrumb">
					<li class="active">
						<a href="#">首页</a> <span class="divider"></span>
					</li>
					<li>
						<a href="<?php echo site_url('xls/add')?>">导入Excel表数据</a> 
					</li>
					<li>
						<a href="<?php echo site_url('xls/update')?>">更新数据</a> 
					</li>
				</ul>
			</div>
			<div>
				<form class="form-inline">
				  <div class="form-group">
				    <label class="sr-only" for="ci">CI</label>
				    <input type="text" class="form-control" name="ci" id="ci" placeholder="请输入CI的值">
				  </div>
				  <button type="button" id="search" class="btn btn-default">搜索</button>
				</form>
			</div>
			<div style="margin-top: 6px;">
				<table class="table table-hover">
					<tr>
						<td class="col-xs-2 col-md-2" style="text-align:right;">LAC</td>
						<td  class="col-xs-10 col-md-10"><span id="lac"></span></td>
					</tr>
					<tr>
						<td class="col-xs-2 col-md-2" style="text-align:right;">CI</td>
						<td  class="col-xs-10 col-md-10"><span id="civ"></span></td>
					</tr>
					<tr>
						<td class="col-xs-2 col-md-2" style="text-align:right;">小区名称</td>
						<td  class="col-xs-10 col-md-10"><span id="cp_name"></span></td>
					</tr>
					<tr>
						<td class="col-xs-2 col-md-2" style="text-align:right;">基站名称</td>
						<td  class="col-xs-10 col-md-10"><span id="bst_name"></span></td>
					</tr>
					<tr>
						<td class="col-xs-2 col-md-2" style="text-align:right;">基站地址</td>
						<td  class="col-xs-10 col-md-10"><span id="bst_addr"></span></td>
					</tr>
					<tr>
						<td class="col-xs-2 col-md-2" style="text-align:right;">RRU1覆盖范围</td>
						<td  class="col-xs-10 col-md-10"><span id="rru1_area"></span></td>
					</tr>
					<tr>
						<td class="col-xs-2 col-md-2" style="text-align:right;">RRU2覆盖范围</td>
						<td  class="col-xs-10 col-md-10"><span id="rru2_area"></span></td>
					</tr>
				</table>
			</div>
		</div>
		<div class="col-md-4 col-sm-4 column">
		</div>
	</div>
	
</div>
<script type="text/javascript">
	$(document).ready(function(){
		$("#search").click(function(){
			var ci=$("#ci").val();
			if(ci==""){
				$("#civ").text("请输入你需要查找的CI");
				//alert("请输入你需要查找的CI");
			}else{
				$.get("<?php echo site_url('xls/get')?>",{ci:ci},function(data){
					var obj=JSON.parse(data);
					if(obj["flag"]=="0"){
						$("#civ").text("没有找到该CI对应的数据");
						//alert("没有找到该CI对应的数据");
					}else{
						var info=obj["info"][0];
						$("#lac").text(info["lac"]);
						$("#civ").text(info["ci"]);
						$("#cp_name").text(info["cp_name"]==null?"":info["cp_name"]);
						$("#bst_name").text(info["bst_name"]==null?"":info["bst_name"]);
						$("#bst_addr").text(info["bst_addr"]==null?"":info["bst_addr"]);
						$("#rru1_area").text(info["rru1_area"]==null?"":info["rru1_area"]);
						$("#rru2_area").text(info["rru2_area"]==null?"":info["rru2_area"]);
					}
				});
			}
			
		});
	});
</script>
</body>
</html>